<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
class User_Model extends CI_Model 
{
    //role = 0: student, role = 1: company
	function insertUser($param){
       $email = $param['email'];
       $password =$param['password'];
       $sql = "insert into users(email,password) values('$email','$password')";
       $this->db->query($sql);
       return true;
	}
    
    function checkEmail($email){
        
       $sql="select count(id) from users where email='$email'";
       $query=$this->db->query($sql);
       $rows= $query->rows();
        
        
        
        
    }
}